from django.db import models


# Create your models here.
class DallJob(models.Model):
    """
    Dall-e-3 任务表
    """
    id = models.BigAutoField(primary_key=True)
    user_id = models.IntegerField(verbose_name="用户ID", blank=False, null=False)
    prompt = models.TextField(verbose_name="绘画提示词", blank=False, null=False)
    imgurl = models.CharField(verbose_name="图片imgurl", max_length=712, default='')
    orgurl = models.CharField(verbose_name="图片orgurl", max_length=712, default='')
    thumburl = models.CharField(verbose_name="图片缩略图", max_length=712, default='')
    publish = models.BooleanField(verbose_name="出版", default=True)
    power = models.IntegerField(verbose_name="消耗算力", default=999)
    progress = models.IntegerField(verbose_name="进度", default=0)
    errmsg = models.CharField(verbose_name="错误信息", max_length=64, default='')
    created_at = models.DateTimeField(auto_now_add=True)

